package com.zhangjianling.lesson_02.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
 * @Auther: zhangjl
 * @Date: 18/11/7 09:30
 * @Description:
 */
@Controller
public class TestController {

    @RequestMapping("hello")
    public String test() {
        return "index";
    }

    /**
     * 参数带有日期类型的解决办法
     * @param date
     * @return
     */
    @ResponseBody
    @RequestMapping("hello1")
    public Date test1(Date date){
        return date;
    }
}
